Skip to content

feat(agno): upgrade to v3.1.10 and add conversation compaction, HyDE and multi-turn eval examples - #91

Open
martimfasantos wants to merge 4 commits into
mainfrom
clean/update-agno-3.1.2
Open

martimfasantos wants to merge 4 commits into
mainfrom
clean/update-agno-3.1.2

Conversation

@martimfasantos

@martimfasantos martimfasantos commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

This PR upgrades Agno from 3.0.9 to 3.1.10 and adds examples for the two headline 3.1.2 features, conversation compaction with a searchable archive and HyDE query transformation on Knowledge, plus multi-turn evals built on the eval Case run arguments from 3.1.6.


What changed

Package upgrade

  • agno upgraded from 3.0.9 → 3.1.10; pyproject.toml floor raised from >=2.8.2 to >=3.1.10

New examples added

File Feature Docs
22_conversation_compaction.py Compaction(...) + agent.compact() folds a 25-row inventory into a 150-token summary, then the agent recovers one row through the search_compacted_history tool Cookbook: searchable archive
23_hyde_query_transform.py Knowledge(query_transformer=HyDE(...)) vs plain search over the same LanceDb table — HyDE ranks the answering page first, plain search ranks a word-overlap page first Query transformation
24_multi_turn_eval.py Eval Case run arguments (session_id, user_id, session_state) — two cases share a session_id and run as turns of one conversation, so turn 2 books the slot from turn-1 history and session state; a third case takes a Message input in a fresh session. Suite passes 3/3 Eval suites

Key changes in v3.0.9 → v3.1.10

  • Eval Case run arguments (3.1.6) — session_id, user_id, session_state, dependencies, metadata and knowledge_filters, with str | Message input; cases sharing a session run as turns. Offloaded read_result also gains max_chars.
  • Conversation compaction (3.1.2) — Agent(compaction=True | Compaction(...)), agent.compact(), archived originals searchable via search_compacted_history.
  • HyDE query transformer (3.1.2) and configurable follow-ups (followups: bool | FollowupConfig); each @approval tool call now gets its own approval record.
  • Knowledge-level reranking with MMRReranker / RecencyReranker (3.0.11); reranker= on vector DBs is deprecated. Also cancellation_stage on run outputs and OpenAIResponses(use_previous_response_id=...).
  • File store keyed by user (3.1.0) — the agno_fs table changed; old tables raise SchemaOutdatedError. Agent(filesystem=...) and AgentOS role-based access control are new.
  • CodingTools.run_shell is opt-in (3.0.10) via enable_run_shell=True.
  • External ClaudeAgent / CodexAgent gain output_schema, retries and metrics (3.1.3) and run sandboxed (3.1.4–3.1.5); CodexAgent signs in automatically with OPENAI_API_KEY (3.1.10).
  • ChartTools and KeenableTools, and workflow step files now reach the next step (3.1.4–3.1.5).
  • Claude() defaults to claude-sonnet-5-5 and a new PostgresCheckpointStore (3.1.8); human-in-the-loop fix for union-typed user-input parameters (3.1.9).

Notes

  • Compaction has no docs.agno.com page yet. Neither llms.txt nor guessed URLs have one, so 22 links the v3.1.2 cookbook file it mirrors.
  • The compaction option is search_compacted_messages, not searchable. The release notes use the wrong name; the example uses the real kwarg.
  • HyDE defaults to OpenAIResponses(id="gpt-5.4"), not the caller's model. The release notes imply otherwise, so 23 passes the settings model explicitly.
  • 22 logs two "tokenizers / tiktoken not installed" warnings. Without the optional agno[tokenizers] extra, Agno estimates tokens from character counts; nothing fails, so the extra wasn't added. The OUTPUTS.md note explains it.
  • 18_filesystem.py is unaffected by the 3.1.0 table change because it deletes its database on start.
  • The third case in 24 gets a new session id on every run. A Case without session_id runs in a generated session, so that line in OUTPUTS.md won't match a fresh run.
  • 21_tool_result_offloading.py prints a shorter search_result on 3.1.10. The final answer is still correct, so its OUTPUTS.md section is left as captured.

Configuration

  • All examples use OpenAI (gpt-4o-mini) via settings.py
  • Dependencies: agno>=3.1.10, lancedb, pydantic-settings
  • Managed with uv package manager

Testing

All 25 examples ran with exit code 0 against v3.1.10. OUTPUTS.md updated for the three new files (22, 23, 24) plus the header; the other 22 sections are unchanged. uv lock --check, uv sync --frozen and py_compile pass locally.

@martimfasantos martimfasantos added size:M Reviewable diff of 150-299 lines (excludes uv.lock, OUTPUTS.md) framework:agno Touches the agno/ framework folder labels Oct 11, 2026
@github-actions github-actions Bot added size:L Reviewable diff of 300-599 lines (excludes uv.lock, OUTPUTS.md) and removed size:M Reviewable diff of 150-299 lines (excludes uv.lock, OUTPUTS.md) labels Oct 24, 2026
@martimfasantos martimfasantos changed the title feat(agno): upgrade to v3.1.2 and add conversation compaction and HyDE examples feat(agno): upgrade to v3.1.10 and add conversation compaction, HyDE and multi-turn eval examples Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework:agno Touches the agno/ framework folder size:L Reviewable diff of 300-599 lines (excludes uv.lock, OUTPUTS.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant